import { LanguageManager } from "../Managers/LanguageManager";

export class AssetUtility
{
    public static GetSpriteAtlas(asset:string):string
    {
        if(asset!=null&&asset.indexOf(":")!=-1)
        {
            let assets = asset.split(":");
            let altasName:string = LanguageManager.GetLang(assets[0]);
            if(altasName!="null"&&altasName!="")assets[0] = altasName;
            asset = assets.join(":");
        }else
        {
            let temp = LanguageManager.GetLang(asset);
            if(temp!=null&&temp!="null")asset = temp;
        }
        return asset;
    }
}
